package com.hsylient.javase.chapter12.demo01.tcp;

import java.io.OutputStream;
import java.net.Socket;

/**
 * 客户端
 *
 */
public class Client {
    public static void main(String[] args) throws Exception {
        Socket socket = new Socket("localhost", 9000);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("hsylient".getBytes());
        outputStream.close();
        socket.close();
    }
}
